<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图书管理系统</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
     <style>
        table {
            border-collapse: collapse;
        }
        th, td {
            border: 1px solid black;
            padding: 8px;
        }
    </style>
</head>
<body>
    <h1>首页</h1>
    <table>
        <tr>
            <td>用户名</td>
            <td>密码</td>
        </tr>
        <tr>
            <td>{{ user.username }}</td>
            <td>{{ user.password }}</td>
        </tr>
        <tr>
            <!-- 字典 -->
            <td>{{ person['username'] }}</td>
            <td>{{ person.password }}</td>
        </tr>
    </table>
    <hr>
    书籍清单({{ books|length }})：<br>
    <table>
        <thead>
            <tr>
                <td>书名</td>
                <td>作者</td>
                <td>价格</td>
            </tr>
        </thead>
        <tbody>
            {% for book in books %}
                <tr>
                    <td>{{ book.name }}</td>
                    <td>{{ book.author }}</td>
                    <td>{{ book.price }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
    <img src="{{ url_for('static', filename='images/bg.jpg') }}">
</body>
</html>